<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../jquery/jquery-3.6.0.js"></script>
    <style>
        body{
            text-align: center;
        }
    </style>
</head>
<body>
    <h1>hide show</h1>
    <p>显示</p>
    <p>隐藏</p>
    <button id="hide">点击我隐藏</button>    
    <button id="show">点击我显示</button>
<script>
    $('#hide').click (function(){
        $('p').hide(1000);   
    })
    $('#show').click (function(){
        $('p:first').show('slow');   
    }
    )
</script>
</body>
</html>